//
//  HistoryHeaderCollectionReusableView.m
//  HappyNews
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 BPWBANP. All rights reserved.
//

#import "HistoryHeaderCollectionReusableView.h"

@implementation HistoryHeaderCollectionReusableView

- (void)setImageHistoryArr:(NSMutableArray *)imageHistoryArr
{
    _imageHistoryArr = imageHistoryArr;
    if (imageHistoryArr.count > 0) {
        if (_picView == nil) {
            _picView = [DCPicScrollView picScrollViewWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight / 3) WithImageUrls:_imageHistoryArr];
            
            _picView.titleData = _titleHistoryArr;
            
            [_picView setImageViewDidTapAtIndex:^(NSInteger index) {
                NSLog(@"%ld",index);
            }];
            
            _picView.AutoScrollDelay = 3.0f;
            
            [self addSubview:_picView];
            [[DCWebImageManager shareManager]setDownloadImageRepeatCount:1];
            
            [[DCWebImageManager shareManager]setDownLoadImageError:^(NSError *error, NSString *url) {
                NSLog(@"%@",error);
            }];
        }
        
    }
     
}

@end
